//
//  DataOfDoingTest.m
//  __PRODUCTNAME__
//
//  Created by li cheng on 16/09/08
//  Copyright (c) __ORGANIZATIONNAME__. All rights reserved.
//

#import "DataOfDoingTest.h"
#import "ChoiceOfDataDoingTest.h"

@implementation DataOfDoingTest

+ (NSDictionary *)objectClassInArray{
    return @{@"choice" : [ChoiceOfDataDoingTest class]};
}

- (void)setValue:(id)value forKey:(NSString *)key{
    [super setValue:value forKey:key];
    if ([key isEqualToString:@"choice"]) {
        NSMutableArray<ChoiceOfDataDoingTest *> *mArrayOfChoiceOfDataDoingTest = [NSMutableArray array];
        for (NSDictionary *dic in value) {
            ChoiceOfDataDoingTest *choiceOfDataDoingTest = [ChoiceOfDataDoingTest modelDic:dic];
            [mArrayOfChoiceOfDataDoingTest addObject:choiceOfDataDoingTest];
        }
        _choice = mArrayOfChoiceOfDataDoingTest;
    }
}

- (void)setValue:(id)value forUndefinedKey:(nonnull NSString *)key{
    [super setValue:value forUndefinedKey:key];
    if ([key isEqualToString:@"id"]) {
        self.ID = value;
    }
}
@end
